<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head th:replace="admin::head"></head>
<title>管理员登录 - 双辞动漫-专注二次元动漫的小站</title>
<meta name="keywords"
      content="双辞动漫,双辞ACG,弹幕视频,弹幕,字幕,动漫,二次元,ACG,动画,番组,新番,日本动漫,追新番,新番动漫,BGM,治愈动漫,最新动漫,动漫资源,好看的动漫,动漫网"/>
<meta name="description" content="双辞动漫专注于资源收集整理 海量的有效的高质量的动漫，资源下载，最新电影，观看完全免费、高速播放、更新及时在线，我们致力为所有动漫迷们提供最好看的动漫"/>
<script type="text/javascript" src="/template/conch/asset/js/set/formValidator.js"></script>
<script type="text/javascript" src="/static/js/jquery.imageupload.js"></script>
<script type="text/javascript">
    var maccms = {"path": "", "mid": "6", "url": "www.scdmfun.cn", "wapurl": "www.cdmfun.cn", "mob_status": "0"};
    var conchtpl = {
        "surl": "/search.html",
        "tipt": "网站公告",
        "tipc": "这里是双辞动漫新站<br><span class='hl-text-conch'>注意事项：</span>1.老站新老站账号不通用<br>老站网址：<span class='hl-text-conch'>dm.scdmfun.cn</span><br>2.如果登录后还是提示未登录请稍等一会再刷新即可<br>动漫闲聊群：<span class='hl-text-conch'>542266218</span>",
        "slink": "https://www.scdmfun.cn/",
        "short": "",
        "api": "0",
        "tok": "",
        "term": "long-term",
        "ver": "3.1"
    }
</script>
<body>
<!--海螺影视主题  https://www.360mb.net/23977.html-->
<div th:replace="admin::.conch-header"></div>
<div id="conch-content" class="conch-content">
    <div class="conch-ctwrap">
        <div class="container">
            <div class="hl-member">
                <div class="hl-reg-wrap">
                    <form class="hl-reg-form" method="post" id="fm" action="">
                        <h2 class="hl-reg-title">管理员登录</h2>
                        <div class="hl-reg-group">
                            <label>账号</label><input type="text" id="user_name" name="user_name" class="hl-reg-control"
                                                    placeholder="输入手机号或登录账号" v-model="ucount">
                        </div>
                        <div class="hl-reg-group">
                            <label>密码</label><input type="password" id="user_pwd" name="user_pwd" class="hl-reg-control"
                                                    placeholder="输入您的登录密码" v-model="password">
                        </div>
                        <input type="button" id="btn_submit" class="hl-btn-submit hl-bg-conch" :value="state" @click="login()">
                    </form>
                    <div class="hl-reg-go hl-text-center clearfix">
                        <a href="/">返回首页</a><a href="/findpass_admin.html">忘记密码</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--海螺影视主题  https://www.360mb.net/23977.html-->
<div th:replace="admin::.conch-footer"></div>
<script src="https://lib.baomitu.com/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.26.0/axios.min.js"></script>
<script type="text/javascript">
    let a=new Vue({
        el: "#conch-content",
        data: {
            ucount: 'admin',
            password: 'a',
            state: '立即登录'
        },
        methods: {
            async login(){
                if(this.ucount==''){
                    alert("请输入账号");
                    return;
                }
                if (this.password==''){
                    alert("请输入密码");
                    return;
                }
                this.state='Loading';
                let _this=this;
                let url = "/login_admin.do";
                let params = new URLSearchParams();
                params.append("name",_this.ucount);
                params.append("password",_this.password);
                await axios.post(url, params).then(res=>{
                    var data=res.data;
                    if (data.code==1){
                        this.password='';
                        window.location.href="/admin";
                    }
                    alert(res.data.msg);
                }).catch(err=>{
                    alert("网络波动，登录失败");
                    this.state='立即登录';
                });;
                this.state='立即登录';
            }
        }
    })
</script>
</body>
</html>